package processes;

import factory.ObserverManager;
import to.ProductTO;
import util.DateUtil;
import util.ProductParser;

public class WrappingMachine extends Machine{
	public WrappingMachine(MachineManager machineManager, String machineId) {
		super(1000,2000,machineManager, machineId);
		setLineName("Wrapping Machine");
	}
	
	@Override
	public void beforeManufacture() {
	}
	
	@Override
	public void afterManufacture() {
		ProductParser pp = ProductParser.getInstance();
		currentProduct.setFinished("T");
		pp.writeProduct(machineManager.getNextDir(), currentProduct);
		
	}
	
	protected void unbindWork() {
		ObserverManager.getInstance().notifyFinishedOrder(work);
		super.unbindWork();
	}
}
